package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {

        String name="马嘉豪";
        int age=18;
        String ganser="女";
        String [] otherInfo={"吃饭","做饭"};
        Student stu=new Student(name,age,ganser,otherInfo);
        System.out.println(stu);
        FileOutputStream fos=new FileOutputStream("student.obj");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(stu);
        System.out.println("xieruwanbi");
        oos.close();
    }
}
